“Anonymous Call” Documentation by “AwsmCreators” v2.1


“Anonymous Call”

NULLPHPSCRIPT.COM

Created: 30/03/2020
By: AwsmCreators
Email: awsmcreators@gmail.com

Thank you for purchasing my app. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Thanks so much!


Table of Contents

  1. Download Android studio
  2. Change Package Name
  3. Change App Name
  4. Set up Admob
  5. Setup Sinch sdk
  6. Firebase Setup
  7. Setup InApp Billing
  8. UPI Payment Setup (For indian users)
  9. Setup call rates)
  10. Generate SHA1 Release Keys for firebase
  11. Create Signed Apk

A) Download Android Studio - top

This project is build on android studio so you need to download and install android studio and follow the steps below

Download and install android studio in your pc Download


HTML Structure

After installing android studio , you need to click on import existing project to get started

If you face any troubles while installing and setup android studio , i advised you to take a look at android studio official documentation fromj google developer website or find some solution from stack overflow


B) Change Package Name - top

  1. Open the project
  2. In your Project pane, click on the little gear icon
  3.  Uncheck / De-select the Compact Empty Middle Packages option
  4. Your package directory will now be broken up in individual directories
  5. Individually select each directory you want to rename, and
  6. Right-click it
  7. Select Refactor
  8. Click on Rename
  9. In the Pop-up dialog, click on Rename Package instead of Rename Directory
  10. Enter the new name and hit Refactor
  11. Click Do Refactor in the bottom
  12. Allow a minute to let Android Studio update all changes
  13. Note: When renaming com in Android Studio, it might give a warning. In such case, select Rename All
  14. Now open your Gradle Build File (build.gradle - Usually app or mobile). Update the applicationId in the defaultConfig to your new Package Name and Sync Gradle, if it hasn't already been updated automatically:
  15. You may need to change the package= attribute in your manifest
  16. Clean and Rebuild
  17. Done! Anyway, Android Studio needs to make this process a little simpler.

C) Change App Name - top

  1. Right-click on your root project directory
  2. Select Refactor -> Rename
  3. Select rename project and change the name there
  4. Also Select rename module and change it there as well. If you get an message saying module name already changed thats fine
  5. Now right-click on the project root folder again and select Open Module Settings
  6. Under the Modules section remove whatever folders are associated to your old project name.
  7. Apply Settings and hit OK
  8. Restart Android Studio

D) Set up Admob - top

  1. Go to Admob Here
  2. If you dont have admob account , you can register
  3. if yo have account already simply login
  4. we currently integrated admob native ads and rewardedvideo only
  5. Now you need to create a new app in admob
  6. put your app credentials like your newly changed package name
  7. and create ad unit id
  8. Create Two Ad Units , One For Rewarded Video And Another One For Native Ads
  9. And Take A Note Of The Ad Unit Ids In Notepad
  10. Now Open Android Studio And Open Your Project
  11. Go To String.xml File
  12. There You Can See Admob Testing Ad Unit Ids
  13. You Need To Replace It With Your Ad Units That You Created Just Now
  14. Thats All You Are Done With Admob

String.xml look like below screenshot
HTML Structure

E) Set up Sinch sdk - top

  1. First G To Sinch Official Website here
  2. If You Dont have An Account You Need To Create An Account First
  3. If You Have Account Already You Can Simply Login
  4. Now You Need To Create New App In Sinch Platforn
  5. Give Your App Name And Description
  6. And They Will Provide You APP KEY And APP SECRET
  7. Just Note There Ids And Open Android Studio
  8. Open Your Project And Open CallService.java
  9. There You Can See Sinch Variables
  10. You Can Simply Replace It With Your Id
  11. Thats All You Are Done With Sinch Integration
This is sinch service.java you need to replace it with your ids
HTML Structure

F) Firebase Setup - top

1. Go To Firebase Console And Register Your App And Debug Keys.

2. Create A Project By Clicking On Create Project

HTML Structure

3. Fill the necessary details in the pop up window about the project. Edit the project ID if required.

HTML Structure

4. Click on create project to finally create it.

5. Now add android app to this project

6. Now a prompt will open where you need to enter your app details and package name

7. Now the app is connected to the Firebase. Now all the cloud based as well server based services can be easily used in the app.

8. Now the app will be registered with firebase.

9. Aso, the SHA1 certificate, can be given, of the app by following steps

10. Now download the google service json file and replace it with the app root directory

HTML Structure

11. Click on setup authentication and enable login phone like in the screenshot below and click ok

firebase6

12. Thats all and one more thing you need to do is create a realtime database by clicking the database tab in firebase console and click on create realtime database(not firestore)

firebase7

13. Now you need to set rules for the databse that you created just now. in default firebase set the rules to false so no one can acess the databse. we need to enable it. just click on rules tab in realtime databale and set the value to true like in the scrrenshot below

firebase8

14. ok we are done creating realtime databse. now we need to enable storage in firebase console to save the images and files in cloud storsge. for that just click on storage option from left side panel and you will see something like below iamge

firebase9

15. Just click on get started and it will begin to create storage for your firebase app


G) Setup Call Rates - top

1. To setup call rates , open android studio and go to Variable>Callrates.java here u can see that i inculed all countries and call rates now you can change the value as u like. see example screenshot below

callrates

H) Setup InApp Billing - top

In-App Purchases (IAPs) are a great way to monetize your app. Rather than charging a flat fee to download your app, you can offer access to specific in-app sections. This allows you to offer some content to the general user, but also offer ‘premium’ content/features of your app for a price.

Before you can create your In-App Purchases, you are required to activate a Merchant account in your Google Developer account. Here’s how

1. Log into your Google Developer account here

https://play.google.com/apps/publish/

2. Click the Settings tab from the menu on the left.

HTML Structure

3. Scroll down to the bottom of this page and you’ll see a link to activate your Merchant account.

Note: When you have activated your Merchant account it will look like this.

google play

Now that you’ve activated your Merchant account, you are required to create inapp products from your Google Developer account. Here’s how:

Create InApp Prouducts

Single In-App Purchases are described as: “A product that is purchased once and does not expire or decrease with use.” This means that there is a one-time charge that will allow the user to access that specific in-app section for the lifetime of your app.

1. Log into your Google Developer account here:

https://play.google.com/apps/publish/

2. Click on your app’s listing

google play3

3. Click on In-App Products tab from the menu on the left.

Note: If your app was already live on the Play Store and you are just now including In-App Purchases, the In-App Products section is found under the Store Presence tab of your app’s listing google play6

4. Make sure you have Managed Products selected, then click Create Managed Products.

google play7

5. Enter your Product ID Make Sure To Note This Id in Notepad

IMPORTANT: It’s a good idea to enter a Product ID that clearly tells you what in-app section this specific purchase will unlock, because you will need to enter the Product ID on your Variable.java. Also, the Product ID must be composed of lower-case letters ( a-z ), numbers ( 0-9 ), underlines ( _ ), or dots ( . ) without any spaces, and it should start with lower-case letters or numbers.

google play8

6. Input your Title and Description, then change the status to Active.

google play9

7. Set a Price, then click Save at the bottom of the page.

google play10

Now that you have your In-App Purchase created, you need to add the Product ID to your app’s Variable.java to do this go to open android studio and open your project and click on variable.java here you need to enter the the ids which we created just now , public key, merchant id and product id. you can see below screenshot of variable.java where you can put this keys and ids

variable

I) UPI Payment Setup (For indian users) - top

What Is UPI

(UPI) Unified Payments Interface is an instant real-time payment system developed by National Payments Corporation of India facilitating inter-bank transactions. The interface is regulated by the Reserve Bank of India and works by instantly transferring funds between two bank accounts on a mobile platform

Note: Non Indian Buyer Can Diable UPI Payment In Android Studio And Use Only Google Play Billing This Works Everywhere In The World

How to Register for HDFC UPI

Please note that an m-PIN is a password that the user will have to provide each time he/she logs into the app And also note your upi name and upi adress we need to put this in variable.java like in the screenshot below.

variable

How UPI Payment Works

When someone clicking on upi purchase option in your app they will enter into any upi app they have instal in their phone and they will promt to pay the amount when they click on pay buton , upi will transefer the payment to your upi adress that you have provided and you will receive the payment directly to your bank account which you linked with your upi adress


J) Generate SHA1 Release Keys for firebase - top

In order to get api calls sucessfully from firebase console , u need to generate sha1 key and put it on firebase console so if you dont do this step , some of the features like phone authentication wont work so this step is importent. follow the steps carefully that i provided below

1. Create keystore in android studio with your detials like full name and adress , ect and create build a signed apk

keystore

2. Now save the keystore somewhere in your computer

3. Now download and install the Keystore exploder in your computer , this software available for windows and mac . i provided download link below

Download keystore exploder

4. After installing the software in your pc , the keystore exploder interface look link in the screenshot. what u need to do is just click on Open an existing keystore and select the keystore that u saved in your computer and it will ask for keystore password. just enter it

keystore1

4. Enter the keystore password and click ok

keystore2

5. After enter the password u will see something like in the screenshot below, just double click on the keystore file

keystore3

6. Now you can see all your keystore information in this page, you will need the sha1 key only so u can see at last columm that i green marked. that is the sha1 fingerprint.

keystore4

7 Now take a note of this sha1 fingerprint key and open firebase console and click on app settings and you will see something like below screenshot

keystore5

8. Just click on ADD FINGERPRIT And paste the sha1 key that u noted from the keystore exploader. thats all you are done. now you can run your app and test the phone authentication.


K) Create Signed Apk - top

HTML Structure
Hope you guys found this documentation useful and if you have any questions or dobuts regrading this setup you can send a mail throught envato profile page and dont forget to rate us on codecanyon if you like our product. thank you have a good day

AwsmCreators

Go To Table of Contents